import {Http} from '@angular/http';
import {NgLayer, NgLayerRef} from 'ng2-layer';
import {Component,ViewContainerRef, Injectable}  from '@angular/core';
import { Router, Params } from '@angular/router';

/**
 * 左侧菜单部分
 */
@Component({
	selector: '.category',
	templateUrl: 'template/router/pay/pay.html'
})
export class PayComp {
	tab = "accountInfo";
	
	constructor(private http:Http, private layer:NgLayer, private router:Router){
		this.http.get({
			search:{
				m:"Admin",
				c:"ApiWallet",
				a:"get_user_wallet"
			}
		}).then((data)=>{
			this.isbind = data.data.is;
			if(this.isbind==0){
				this.router.navigateByUrl('/bind_wx');
			}
		});
	}
	
	swichTab(tab){
		this.tab = tab;
	}
}